package ru.jexp.rcp.supply.beans.project.dvs.sostavizdelia;

import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;

import ru.jexp.rcp.supply.n.commands.state.StateAddSostavIzdelia;
import ru.jexp.rcp.supply.n.commands.state.StateEditSostavIzdelia;
import ru.jexp.rcp.supply.n.commands.state.StateExpandFullSostavIzdelia;
import ru.jexp.rcp.supply.n.commands.state.StateExpandMainSostavIzdelia;
import ru.jexp.rcp.supply.n.commands.state.StateRemoveSostavIzdelia;

public class StateCommandSostavIzdeliaListener implements ISelectionChangedListener
{
	public static final StateCommandSostavIzdeliaListener INST = new StateCommandSostavIzdeliaListener();

	private static ISelectionChangedListener[] states = {	StateAddSostavIzdelia.INST,
	                                                     	StateEditSostavIzdelia.INST,
															StateRemoveSostavIzdelia.INST,
															StateExpandFullSostavIzdelia.INST,
															StateExpandMainSostavIzdelia.INST };

	private StateCommandSostavIzdeliaListener()
	{
	}

	@Override
	public void selectionChanged(SelectionChangedEvent event)
	{
		for (ISelectionChangedListener scl : states)
		{
			scl.selectionChanged(event);
		}
	}

}
